public class CharTest {
  public static void main(String[] args) {
    char[] array = new char[10];
    String greeting = "HelloWorld";

    for (int i = 0; i < 10; i++) {
      array[i] = greeting.charAt(i);
    }

    System.out.println(array);
  }
}
